<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="responsive,resilient,elastic," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="说在前面  &amp;nbsp;  &amp;nbsp;信息工业革命正处在一个爆发期，每天都有新的热点，新的需求，新的技术。社会的节奏在加快，个人的节奏在加快，是疲于被动的响应，还是找准问题的本质，谋定而动？ 活性系统宣言（按自己的理解翻译）可以让我们思考一下何为现代系统，如何在系统设计之初就考虑活性系统应该具有的特性，从而避免系统的溃败。">
<meta property="og:type" content="article">
<meta property="og:title" content="活性系统宣言(The Reactive Manifesto)">
<meta property="og:url" content="http://chrisrc.me/2015/09/11/the-reactive-menifesto/index.html">
<meta property="og:site_name" content="山中，山外与俯瞰">
<meta property="og:description" content="说在前面  &amp;nbsp;  &amp;nbsp;信息工业革命正处在一个爆发期，每天都有新的热点，新的需求，新的技术。社会的节奏在加快，个人的节奏在加快，是疲于被动的响应，还是找准问题的本质，谋定而动？ 活性系统宣言（按自己的理解翻译）可以让我们思考一下何为现代系统，如何在系统设计之初就考虑活性系统应该具有的特性，从而避免系统的溃败。">
<meta property="og:image" content="http://chrisrc.me/images/reactive_menifesto_reactive-traits.svg">
<meta property="og:updated_time" content="2016-12-17T07:29:29.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="活性系统宣言(The Reactive Manifesto)">
<meta name="twitter:description" content="说在前面  &amp;nbsp;  &amp;nbsp;信息工业革命正处在一个爆发期，每天都有新的热点，新的需求，新的技术。社会的节奏在加快，个人的节奏在加快，是疲于被动的响应，还是找准问题的本质，谋定而动？ 活性系统宣言（按自己的理解翻译）可以让我们思考一下何为现代系统，如何在系统设计之初就考虑活性系统应该具有的特性，从而避免系统的溃败。">
<meta name="twitter:image" content="http://chrisrc.me/images/reactive_menifesto_reactive-traits.svg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://chrisrc.me/2015/09/11/the-reactive-menifesto/"/>





  <title> 活性系统宣言(The Reactive Manifesto) | 山中，山外与俯瞰 </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">山中，山外与俯瞰</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">一次永不停止的探索之旅</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-dcos">
          <a href="/dcos" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-book"></i> <br />
            
            DC/OS
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="st-search-show-outputs">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <form class="site-search-form">
  <input type="text" id="st-search-input" class="st-search-input st-default-search-input" />
</form>

<script type="text/javascript">
  (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
    (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
    e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
  })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

  _st('install', 'R9GcmhBwxpsAGLNCsquZ','2.0.0');
</script>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://chrisrc.me/2015/09/11/the-reactive-menifesto/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="chrisrc">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/avatar.gif">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="山中，山外与俯瞰">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="山中，山外与俯瞰" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                活性系统宣言(The Reactive Manifesto)
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2015-09-11T21:38:32+08:00">
                2015-09-11
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/技术/" itemprop="url" rel="index">
                    <span itemprop="name">技术</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <a href="/2015/09/11/the-reactive-menifesto/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/09/11/the-reactive-menifesto/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="说在前面"><a href="#说在前面" class="headerlink" title="说在前面"></a>说在前面</h2><p>  &nbsp;  &nbsp;信息工业革命正处在一个爆发期，每天都有新的热点，新的需求，新的技术。社会的节奏在加快，个人的节奏在加快，是疲于被动的响应，还是<br>找准问题的本质，谋定而动？ <strong>活性系统宣言</strong>（按自己的理解翻译）可以让我们思考一下何为现代系统，如何在系统设计之初就考虑活性系统<br>应该具有的特性，从而避免系统的溃败。</p>
<a id="more"></a>
<p>  &nbsp;  &nbsp;限于水平，附上英文，供对比，不当之处请斧正。<a href="http://www.reactivemanifesto.org/" target="_blank" rel="external">活性系统宣言(The Reactive Manifesto)官网</a></p>
<h2 id="正文"><a href="#正文" class="headerlink" title="正文"></a>正文</h2><p>  &nbsp;  &nbsp;处在不同领域的组织机构不约而同的发现他们用来构建各自领域软件系统的模式看起来是一致的。这些系统必须 <em>更健壮</em>，<em>更具弹性</em>，<em>更加灵活</em> 和<br><em>更明确的定位</em> 来满足现代系统的需求。</p>
<p><br></p>
<p>  &nbsp;  &nbsp;Organisations working in disparate domains are independently discovering patterns for building software that look the same. These systems are more robust, more resilient, more flexible and better positioned to meet modern demands.</p>
<p><br></p>
<p>  &nbsp;  &nbsp;之所以出现这些变化，是因为近些年来应用系统需求发生了巨大的变化。仅仅是在几年前，一个大型系统还只需要十几台服务器，秒级的响应时间，<br>数小时的线下维护时间和GB级别的数据量。而今天，应用已经部署在从单一移动设备到运行在数以千计的多核处理器之上的基于云计算的集群。<br>用户希望看到的是毫秒级响应，100%的线上正常运营。而数据也是以PB计量。今天的应用需求根本就不是昨天的软件架构所能满足的。</p>
<p><br></p>
<p>  &nbsp;  &nbsp;These changes are happening because application requirements have changed dramatically in recent years. Only a few years ago a large application had tens of servers, seconds of response time, hours of offline maintenance and gigabytes of data. Today applications are deployed on everything from mobile devices to cloud-based clusters running thousands of multi-core processors. Users expect millisecond response times and 100% uptime. Data is measured in Petabytes. Today’s demands are simply not met by yesterday’s software architectures.</p>
<p><br></p>
<p>  &nbsp;  &nbsp;我们认为采取相干策略来进行系统架构是必要的，我们也认为架构现代系统所考虑的必要因素都已被各自确认，即：我们希望现代系统是<br><em>响应的</em>，<em>弹性的</em>，<em>扩展的</em> 并且是 <em>消息驱动</em> 的，我们称之为 <strong>活性</strong> 系统。</p>
<p><br></p>
<p>  &nbsp;   &nbsp; We believe that a coherent approach to systems architecture is needed, and we believe that all necessary aspects are already recognised individually: we want systems that are Responsive, Resilient, Elastic and Message Driven. We call these Reactive Systems.</p>
<p><br></p>
<p>  &nbsp;   &nbsp; 以活性系统为基准构建的应用系统更灵活，松散耦合并且<a href="http://www.reactivemanifesto.org/glossary#Scalability" target="_blank" rel="external">可扩展(scalable)</a>，这也使得系统易于<br>开发，易于改变。同样，以活性系统为基准的应用系统对失败有更强的包容，当<a href="http://www.reactivemanifesto.org/glossary#Failure" target="_blank" rel="external">失败(failure)</a><br>真的发生时，系统去优雅的面对而不是带来灾难。活性系统是高度响应的，能为<a href="http://www.reactivemanifesto.org/glossary#User" target="_blank" rel="external">用户</a><br>带来有效的交互式反馈。</p>
<p><br></p>
<p>  &nbsp;   &nbsp; Systems built as Reactive Systems are more flexible, loosely-coupled and scalable. This makes them easier to develop and amenable to change. They are significantly more tolerant of failure and when failure does occur they meet it with elegance rather than disaster. Reactive Systems are highly responsive, giving users effective interactive feedback.</p>
<p><br></p>
<p><strong>活性系统</strong> 是：</p>
<ul>
<li><p><strong>响应的(Responsive)</strong>：<br><a href="http://www.reactivemanifesto.org/glossary#System" target="_blank" rel="external">系统</a>尽可能的及时响应。响应是可用性和实用性的基石，不止如此，响应也意味着<br>问题能够被快速检测并有效处理。活性系统专注于提供快速、一致的响应时间，并通过建立可靠的上限来提供一致的服务体验。这种一致<br>的行为反过来简化了错误处理，增强了最终用户的信心，激发了更进一步的互动。</p>
<p>  Responsive: The system responds in a timely manner if at all possible. Responsiveness is the cornerstone of usability and utility, but more than that, responsiveness means that problems may be detected quickly and dealt with effectively. Responsive systems focus on providing rapid and consistent response times, establishing reliable upper bounds so they deliver a consistent quality of service. This consistent behaviour in turn simplifies error handling, builds end user confidence, and encourages further interaction.</p>
</li>
<li><p><strong>弹性的(Resilient)</strong>：<br>系统在面对故障时仍保持响应。这不仅适用于高度可用的关键任务系统，任何非弹性系统面对故障时将会变得响应迟钝。弹性是通过<br> <em><a href="http://www.reactivemanifesto.org/glossary#Replication" target="_blank" rel="external">冗余（replication）</a></em>，<br><em>遏制（containment）</em>，<em><a href="http://www.reactivemanifesto.org/glossary#Isolation" target="_blank" rel="external">隔离（isolation）</a></em> 和 <em><a href="http://www.reactivemanifesto.org/glossary#Delegation" target="_blank" rel="external">委托（delegation）</a></em> 实现的。故障被遏制在各个组件内部，<br>各个组件相互隔离，因此确保只有部分系统故障和恢复而不会损坏整个系统。每个组件的恢复委托给另一个（外部）组件处理，高可用性通过<br>在必要的地方做冗余复制来实现。组件的客户端不必为组件的故障背负处理的职责。</p>
<p>  <strong>Resilient</strong>: The system stays responsive in the face of failure. This applies not only to highly-available, mission critical systems — any system that is not resilient will be unresponsive after a failure. Resilience is achieved by replication, containment, isolation and delegation. Failures are contained within each component, isolating components from each other and thereby ensuring that parts of the system can fail and recover without compromising the system as a whole. Recovery of each component is delegated to another (external) component and high-availability is ensured by replication where necessary. The client of a component is not burdened with handling its failures.</p>
</li>
<li><p><strong>伸缩的(Elastic)</strong> ：<br>  系统面对不同的载荷都能保持响应。活性系统能够根据输入频率的变化而相应的增加或减少<a href="http://www.reactivemanifesto.org/glossary#Resource" target="_blank" rel="external">资源</a>的分配来应对，这也意味着系统的设计要具备<br>  分片或组件冗余并分散输入的能力来避免资源竞争和中央瓶颈。活性系统通过实时的性能测量来支撑预测，保持活性和伸缩规则。活性系统以<br>  一种高性价比的方式在硬件及软件平台上实现<a href="http://www.reactivemanifesto.org/glossary#Elasticity" target="_blank" rel="external">弹性</a>。</p>
<p>  <strong>Elastic</strong>: The system stays responsive under varying workload. Reactive Systems can react to changes in the input rate by increasing or decreasing the resources allocated to service these inputs. This implies designs that have no contention points or central bottlenecks, resulting in the ability to shard or replicate components and distribute inputs among them. Reactive Systems support predictive, as well as Reactive, scaling algorithms by providing relevant live performance measures. They achieve elasticity in a cost-effective way on commodity hardware and software platforms.</p>
</li>
<li><p><strong>消息驱动(Message Driven)</strong> ：<br>活性系统依赖于<a href="http://www.reactivemanifesto.org/glossary#Asynchronous" target="_blank" rel="external">异步</a><a href="http://www.reactivemanifesto.org/glossary#Message-Driven" target="_blank" rel="external">消息传递</a>来实现组件边界从而确保松耦合，隔离，<a href="http://www.reactivemanifesto.org/glossary#Location-Transparency" target="_blank" rel="external">位置透明</a>并以消息的形式委托组件处理<a href="http://www.reactivemanifesto.org/glossary#Failure" target="_blank" rel="external">错误</a>。显式的消息传递使得通过<br>塑造和监控系统内的消息队列并在必要的时候<a href="http://www.reactivemanifesto.org/glossary#Back-Pressure" target="_blank" rel="external">回压(back-pressure)</a>负载来<br>实现负载管理，弹性和流程控制。以位置透明的方式进行消息传递使得故障管理在一个集群或单一主机上的处理结构和语义得以保持一致。<br><a href="http://www.reactivemanifesto.org/glossary#Non-Blocking" target="_blank" rel="external">非阻塞通信</a>使得接收方仅在激活状态时消耗<a href="http://www.reactivemanifesto.org/glossary#Resource" target="_blank" rel="external">资源</a>，从而降低系统开销。</p>
<p>  <strong>Message Driven</strong>: Reactive Systems rely on asynchronous message-passing to establish a boundary between components that ensures loose coupling, isolation, location transparency, and provides the means to delegate errors as messages. Employing explicit message-passing enables load management, elasticity, and flow control by shaping and monitoring the message queues in the system and applying back-pressure when necessary. Location transparent messaging as a means of communication makes it possible for the management of failure to work with the same constructs and semantics across a cluster or within a single host. Non-blocking communication allows recipients to only consume resources while active, leading to less system overhead.</p>
</li>
</ul>
<p><img src="/images/reactive_menifesto_reactive-traits.svg" alt="Reactive Traits"></p>
<p><br></p>
<p>&nbsp; &nbsp; 大型系统由众多小的子系统组成，因此它依赖于各个子系统的活性属性（Reactive properties）。这意味着，活性系统应用的设计原则，使这些属性<br>适用于所有级别的规模，使得它们可组合。世界上最大的系统依赖于基于这些活性属性进行架构，从而能够为数十亿人的日常需求提供服务。<br>是时候在从头开始设计系统时就有意识的应用这些设计原则，而不是每次都需要重新发现。</p>
<p><br></p>
<p>&nbsp; &nbsp; Large systems are composed of smaller ones and therefore depend on the Reactive properties of their constituents. This means that Reactive Systems apply design principles so these properties apply at all levels of scale, making them composable. The largest systems in the world rely upon architectures based on these properties and serve the needs of billions of people daily. It is time to apply these design principles consciously from the start instead of rediscovering them each time.</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/responsive/" rel="tag"># responsive</a>
          
            <a href="/tags/resilient/" rel="tag"># resilient</a>
          
            <a href="/tags/elastic/" rel="tag"># elastic</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2015/09/09/ruby-on-rails-learning-notes/" rel="next" title="Ruby on Rails 4 入门">
                <i class="fa fa-chevron-left"></i> Ruby on Rails 4 入门
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2015/09/16/autoit-jenkins-with-gitlab/" rel="prev" title="IT自动化(7)——持续集成从Gitlab到Jenkins">
                IT自动化(7)——持续集成从Gitlab到Jenkins <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
        <div class="ds-share flat" data-thread-key="2015/09/11/the-reactive-menifesto/"
     data-title="活性系统宣言(The Reactive Manifesto)"
     data-content=""
     data-url="http://chrisrc.me/2015/09/11/the-reactive-menifesto/">
  <div class="ds-share-inline">
    <ul  class="ds-share-icons-16">

      <li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到：</a></li>
      <li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
      <li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
      <li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
      <li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>

    </ul>
    <div class="ds-share-icons-more">
    </div>
  </div>
</div>
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2015/09/11/the-reactive-menifesto/"
           data-title="活性系统宣言(The Reactive Manifesto)" data-url="http://chrisrc.me/2015/09/11/the-reactive-menifesto/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/avatar.gif"
               alt="chrisrc" />
          <p class="site-author-name" itemprop="name">chrisrc</p>
          <p class="site-description motion-element" itemprop="description"></p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">69</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">21</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">162</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/christtrc" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://twitter.com/chrisrc" target="_blank" title="Twitter">
                  
                    <i class="fa fa-fw fa-twitter"></i>
                  
                  Twitter
                </a>
              </span>
            
          
        </div>

        
        
          <div class="cc-license motion-element" itemprop="license">
            <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" target="_blank">
              <img src="/images/cc-by-nc-sa.svg" alt="Creative Commons" />
            </a>
          </div>
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#说在前面"><span class="nav-number">1.</span> <span class="nav-text">说在前面</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#正文"><span class="nav-number">2.</span> <span class="nav-text">正文</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy;  2015 - 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">
     
      <a href="mailto:chrisrc@qq.com">chrisrc</a> 
    
  </span>
  <span class="author"> &nbsp; QQ: 58122705 </span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"chrisrc"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
    
    <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
    <script src="/js/src/hook-duoshuo.js"></script>
  








  
  

  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  
<script>
(function(){
   var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?ed903ab05fbc5fa64d95e4bfbf3d3a04":"https://jspassport.ssl.qhimg.com/11.0.1.js?ed903ab05fbc5fa64d95e4bfbf3d3a04";
   document.write('<script src="' + src + '" id="sozz"><\/script>');
})();
</script>

  


</body>
</html>
